package com.design.flyweight;

/**
 * @author leali
 * @title: IgoChessman
 * @projectName design
 * @description: IgoChessman充当抽象享元类，BlackIgoChessman和WhiteIgoChessman充当具体享元类，IgoChessmanFactory充当享元工厂类
 * @date 2022/1/3 1:01
 */
public abstract class IgoChessman {
    public abstract String getColor();

    public void display(Coordinates coordinates) {
        System.out.println("棋子颜色：" + this.getColor() + "，棋子位置：" + coordinates.getX() + "，" + coordinates.getY() );
    }
}
